import { cloudService } from './index'
import { IUser } from '@/types/auth.ts'

export const queryUserApi = (id: number): Promise<IUser> =>
  cloudService({
    url: `/home-api/user/${id}`,
    method: 'get'
  })

export const updateUserApi = (id: number, user: IUser): Promise<boolean> =>
  cloudService({
    url: `/home-api/user/${id}`,
    method: 'put',
    data: user
  })
